<template>
  <div>
    <student  ref="stu" ></student>
    <school></school>
    {{ name }}
    <h2 ></h2>
    <button @click="out">点击</button>
  </div>
</template>
<script>
import School from './components/school.vue';
import student from "./components/student.vue";
import school from "./components/school.vue"
export default {
  name: "app",
  data() {
    return { name: "milk" ,
    age:18};
  },
  components: {
    student,
    School,
    school
  },
  methods:{
      out(){
          console.log(this.$refs.stu);
      }
  }
};
</script>